﻿using System;
using System.Linq;
using BuildMonitor.Properties;

namespace BuildMonitor.Engine
{
	public static class PublisherFactory
	{
		public static void InstantiatePublishers(ILog log, BuildWatcher buildWatcher)
		{
			string[] methods = Settings.Default.PublisherMethod.Split(';');
			if (methods.Contains("twitter", StringComparer.CurrentCultureIgnoreCase))
				new TwitterBuildPublisherHelper(log, buildWatcher);
			if (methods.Contains("delcom", StringComparer.CurrentCultureIgnoreCase))
				new DelcomBuildPublisher(log, buildWatcher);
		}
	}
}